Migrate remaining V2 APIs from @EndPoint/@Command to JAX-RS#21
Draft
Migrate remaining V2 APIs from @EndPoint/@Command to JAX-RS#21
Conversation
Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review and migrate V2 APIs to use JAX-RS
Migrate ClusterAPI, NodeHealthAPI, and NodeThreadsAPI from @EndPoint to JAX-RS
Feb 21, 2026
Migrated the following old-style V2 API classes to JAX-RS: Task 1 - Delete dead old-style API files: - Deleted NodeHealthAPI.java (replaced by NodeHealth.java JAX-RS impl) - Deleted NodeThreadsAPI.java (replaced by NodeThreads.java JAX-RS impl) - Deleted RenameCoreAPI.java (replaced by RenameCore.java JAX-RS impl) Task 2 - Delete/update test files: - Deleted V2NodeAPIMappingTest.java (all tested APIs migrated to JAX-RS) - Deleted V2CoreAPIMappingTest.java (all tested APIs migrated to JAX-RS) - Deleted V2CollectionAPIMappingTest.java (all tested APIs migrated to JAX-RS) - Deleted V2ShardsAPIMappingTest.java (SplitShardAPI migrated to JAX-RS) Task 3 - Migrate NodePropertiesAPI to JAX-RS: - Created NodePropertiesApi.java endpoint interface - Created NodePropertiesResponse.java model - Created NodeProperties.java JAX-RS implementation - Updated PropertiesRequestHandler to use getJerseyResources() - Deleted NodePropertiesAPI.java Task 4 - Migrate NodeSystemInfoAPI to JAX-RS: - Created NodeSystemInfoApi.java endpoint interface - Created NodeSystemInfo.java JAX-RS implementation - Updated SystemInfoHandler to use getJerseyResources() - Deleted NodeSystemInfoAPI.java Task 5 - Migrate CoreAdmin @endpoint APIs to JAX-RS: - Created OverseerOperationApi/OverseerOperation (POST /node/overseer-op) - Created RejoinLeaderElectionApi/RejoinLeaderElection (POST /node/rejoin-leader-election) - Created SplitCoreApi/SplitCore (POST /cores/{coreName}/split) - Created RequestCoreRecoveryApi/RequestCoreRecovery (POST /cores/{coreName}/request-recovery) - Created PrepareCoreRecoveryApi/PrepareCoreRecovery (POST /cores/{coreName}/prep-recovery) - Created RequestApplyCoreUpdatesApi/RequestApplyCoreUpdates (POST /cores/{coreName}/request-apply-updates) - Created RequestSyncShardApi/RequestSyncShard (POST /cores/{coreName}/request-sync-shard) - Created RequestBufferUpdatesApi/RequestBufferUpdates (POST /cores/{coreName}/request-buffer-updates) - Updated CoreAdminHandler to use getJerseyResources() - Deleted all old CoreAdmin *API.java files Task 6 - Migrate Collections @endpoint APIs to JAX-RS: - Created SplitShardApi/SplitShard (POST /collections/{collectionName}/shards/split) - Created MigrateDocsApi/MigrateDocs (POST /collections/{collectionName}/migrate) - Created ModifyCollectionApi/ModifyCollection (POST /collections/{collectionName}/modify) - Created MoveReplicaApi/MoveReplica (POST /collections/{collectionName}/move-replica) - Created RebalanceLeadersApi/RebalanceLeaders (POST /collections/{collectionName}/rebalance-leaders) - Updated CollectionsHandler to use getJerseyResources() - Deleted all old Collections *API.java files New model classes in solr/api/model: - OverseerOperationRequestBody, RejoinLeaderElectionRequestBody - SplitCoreRequestBody, PrepareCoreRecoveryRequestBody - SplitShardRequestBody, MigrateDocsRequestBody - ModifyCollectionRequestBody, MoveReplicaRequestBody - RebalanceLeadersRequestBody, NodePropertiesResponse Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ict and test failures Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
Copilot
AI
changed the title
Migrate ClusterAPI, NodeHealthAPI, and NodeThreadsAPI from @EndPoint to JAX-RS
Migrate remaining V2 @EndPoint/@Command APIs to JAX-RS
Feb 22, 2026
Tests verify that v2 request body fields are correctly mapped to v1 params passed to handleRequestBody() for APIs migrated from the old @EndPoint/@command style. Coverage added for: - SplitShard, MigrateDocs, ModifyCollection, MoveReplica, RebalanceLeaders (collections APIs using CollectionsHandler) - SplitCore, RequestCoreRecovery, PrepareCoreRecovery, RequestApplyCoreUpdates, RequestSyncShard, RequestBufferUpdates (CoreAdminAPIBase using MultiCoreHandler) - OverseerOperation, RejoinLeaderElection (JerseyResource using MultiCoreHandler) - NodeProperties (reads from NodeConfig directly) - NodeSystemInfo (delegates to SystemInfoHandler) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot
AI
changed the title
Migrate remaining V2 @EndPoint/@Command APIs to JAX-RS
Migrate remaining V2 APIs from @EndPoint/@Command to JAX-RS
Feb 22, 2026
Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
Copilot stopped work on behalf of
epugh due to an error
February 22, 2026 01:40
…ingleWarning for JAX-RS migration Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
…d reference guide docs Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several V2 API handlers still used Solr's older home-grown
@EndPoint/@Commandannotation-dispatch system instead of JAX-RS. This PR completes the migration so all V2 APIs follow the same JAX-RS pattern already used byGetPublicKeyApi,ContainerPluginsApi, etc.Migrated APIs
Node APIs
NodeHealthAPI→NodeHealth+NodeHealthApiinterface +NodeHealthResponsemodelNodeThreadsAPI→NodeThreads+NodeThreadsApiinterfaceNodePropertiesAPI→NodePropertiesNodeSystemInfoAPI→NodeSystemInfoCluster APIs
ClusterAPI→Cluster+ClusterApisinterface;ClusterNodeRoles+ClusterNodeRolesApisinterfaceAddRoleRequestBody,RateLimiterPayloadCoreAdmin APIs
RejoinLeaderElectionAPI,OverseerOperationAPI,SplitCoreAPI,RequestCoreRecoveryAPI,PrepareCoreRecoveryAPI,RequestApplyCoreUpdatesAPI,RequestSyncShardAPI,RequestBufferUpdatesAPICollections/Shards APIs
SplitShardAPI,MigrateDocsAPI,ModifyCollectionAPI,MoveReplicaAPI,RebalanceLeadersAPIPattern change
Old command-dispatch (body wraps params in a named-command key):
New JAX-RS (flat body to a dedicated path):
Cleanup
V2ClusterAPIMappingTest,V2NodeAPIMappingTest,V2CoreAPIMappingTest,V2CollectionAPIMappingTest,V2ShardsAPIMappingTest— these tested the old mapping infrastructure, not actual behaviour.solr/core/src/test/org/apache/solr/handler/admin/api/verifying parameter mapping to handler params.V2ApiIntegrationTest(testException,testIntrospect,testSingleWarning) which were using old command-style POST bodies that now 404.TestApiFrameworkwhich asserted over collection-path@Commandentries that no longer exist; replaced with a self-contained inner test class.shard-management.adoc,replica-management.adoc,collection-management.adoc,collections-api.adoc,v2-api.adoc) to reflect new JAX-RS paths.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
develocity.apache.org/usr/lib/jvm/temurin-21-jdk-amd64/bin/java /usr/lib/jvm/temurin-21-jdk-amd64/bin/java -XX:ReservedCodeCacheSize=256m -XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.